    function do_login() {
        if($("#uid").val()=="" || $("#pwd").val()=="") {
            alert("请输入用户名及登录密码！");
            return false;
        }
        if($("#ac").val()=="") {
            alert("请输入登录验证码！");
            return false;
        }
        $("#btnLogin").val("验证中...");
        $("#btnLogin").attr("disabled", true);

        var params = {"uid":$("#uid").val(),"pwd":$("#pwd").val(),"ac":$("#ac").val()};
        $.post("user/do_login", params, handleResult);
    }
    
    function handleResult(data) {
        if(data == "ok") {
            window.location = base_url + default_page;
        } else if(data == "ac_incorrect") {
            alert("验证码输入错误！请确认！");
            $("#btnLogin").val("登 录");
            $("#btnLogin").attr("disabled", false);
        } else if(data == "disabled") {
            alert("此用户账号已经失效！请确认！");
            $("#btnLogin").val("登 录");
            $("#btnLogin").attr("disabled", false);
        } else {
            alert("用户名或密码错误！请重试！");
            $("#btnLogin").val("登 录");
            $("#btnLogin").attr("disabled", false);
        }
    }